VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form tipo_Cambio 
   BackColor       =   &H00FFFFFF&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Tipo de Cambio"
   ClientHeight    =   1920
   ClientLeft      =   48
   ClientTop       =   420
   ClientWidth     =   5064
   BeginProperty Font 
      Name            =   "Verdana"
      Size            =   9
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1920
   ScaleWidth      =   5064
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmd_guardar 
      Caption         =   "GUARDAR"
      Height          =   375
      Left            =   0
      TabIndex        =   6
      Top             =   120
      Width           =   1095
   End
   Begin VB.TextBox txt_referencia 
      Height          =   375
      Left            =   1800
      TabIndex        =   1
      Top             =   600
      Width           =   3255
   End
   Begin VB.TextBox txt_cambio 
      Height          =   375
      Left            =   1800
      TabIndex        =   0
      Top             =   1080
      Width           =   3255
   End
   Begin MSComCtl2.DTPicker dtp_tipoCambio 
      Height          =   315
      Left            =   1800
      TabIndex        =   2
      Top             =   1560
      Width           =   1695
      _ExtentX        =   2985
      _ExtentY        =   550
      _Version        =   393216
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      CalendarBackColor=   16777215
      CalendarForeColor=   -2147483646
      CalendarTitleBackColor=   -2147483635
      CalendarTitleForeColor=   16777215
      CalendarTrailingForeColor=   -2147483635
      Format          =   42467329
      CurrentDate     =   41244
      MinDate         =   36526
   End
   Begin VB.Label lblId 
      Height          =   252
      Left            =   2880
      TabIndex        =   7
      Top             =   240
      Visible         =   0   'False
      Width           =   492
   End
   Begin VB.Image Image5 
      Height          =   240
      Left            =   4440
      Picture         =   "tipo_Cambio.frx":0000
      Top             =   120
      Visible         =   0   'False
      Width           =   4140
   End
   Begin VB.Image Image6 
      Height          =   216
      Left            =   4440
      Picture         =   "tipo_Cambio.frx":1666
      Top             =   600
      Visible         =   0   'False
      Width           =   4152
   End
   Begin VB.Image Image7 
      Height          =   216
      Left            =   3840
      Picture         =   "tipo_Cambio.frx":2BC8
      Top             =   960
      Visible         =   0   'False
      Width           =   5076
   End
   Begin VB.Label lbl_ref 
      BackColor       =   &H80000009&
      BackStyle       =   0  'Transparent
      Caption         =   "REFERENCIA"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   600
      Width           =   1575
   End
   Begin VB.Label lbl_tipo 
      BackColor       =   &H80000009&
      BackStyle       =   0  'Transparent
      Caption         =   "TIPO CAMBIO"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   1080
      Width           =   1695
   End
   Begin VB.Label lbl_fecha 
      BackColor       =   &H80000009&
      BackStyle       =   0  'Transparent
      Caption         =   "FECHA"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   1560
      Width           =   1575
   End
End
Attribute VB_Name = "tipo_Cambio"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Activate()
'Activar
nombreform = Me.Name
End Sub

Private Sub Form_Load()
'txt_referencia.SetFocus
dtp_tipoCambio = Day(Now) & "-" & Month(Now) & "-" & Year(Now)
End Sub
Private Sub cmd_guardar_Click()
Dim aux As String, fecha As String

fecha = dtp_tipoCambio.Year & "/" & dtp_tipoCambio.Month & "/" & dtp_tipoCambio.Day
If cmd_guardar.Caption = "EDITAR" Then
aux = "tipo_us = '" & txt_cambio.Text & "', referencia='" & txt_referencia.Text & "',fecha='" & fecha & "'"
 If txt_cambio.Text <> "" Then
 Call UpdateCostos("tipo_cambio", aux, "cod_tipoCambio=" & lblId.Caption, 0)
 Call mensajes(5): Unload Me
 Else
 Call mensajes(9)
 End If
Else
aux = "'','" & txt_cambio.Text & "', '" & txt_referencia.Text & "','" & fecha & "'"
Call insertAdd("tipo_cambio", aux)
Call mensajes(5): Unload Me
End If
cargar


End Sub

Sub cargar()
band = 2
Unload Me
Unload lista
lista.Show
End Sub

